3.1.38 \(\int \frac {1}{3-5 \cos (c+d x)} \, dx\) [38]

Optimal. Leaf size=63 \[ \frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \]

[Out]

1/4*ln(cos(1/2*d*x+1/2*c)-2*sin(1/2*d*x+1/2*c))/d-1/4*ln(cos(1/2*d*x+1/2*c)+2*sin(1/2*d*x+1/2*c))/d

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2738, 213} \begin {gather*} \frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (2 \sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - 5*Cos[c + d*x])^(-1),x]

[Out]

Log[Cos[(c + d*x)/2] - 2*Sin[(c + d*x)/2]]/(4*d) - Log[Cos[(c + d*x)/2] + 2*Sin[(c + d*x)/2]]/(4*d)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 2738

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{3-5 \cos (c+d x)} \, dx &=\frac {2 \text {Subst}\left (\int \frac {1}{-2+8 x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}\\ &=\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 63, normalized size = 1.00 \begin {gather*} \frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d}-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - 5*Cos[c + d*x])^(-1),x]

[Out]

Log[Cos[(c + d*x)/2] - 2*Sin[(c + d*x)/2]]/(4*d) - Log[Cos[(c + d*x)/2] + 2*Sin[(c + d*x)/2]]/(4*d)

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 38, normalized size = 0.60

method result size
derivativedivides \(\frac {\frac {\ln \left (2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4}-\frac {\ln \left (2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4}}{d}\) \(38\)
default \(\frac {\frac {\ln \left (2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4}-\frac {\ln \left (2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4}}{d}\) \(38\)
norman \(\frac {\ln \left (2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{4 d}-\frac {\ln \left (2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{4 d}\) \(40\)
risch \(\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {3}{5}-\frac {4 i}{5}\right )}{4 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {3}{5}+\frac {4 i}{5}\right )}{4 d}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(3-5*cos(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/4*ln(2*tan(1/2*d*x+1/2*c)-1)-1/4*ln(2*tan(1/2*d*x+1/2*c)+1))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 50, normalized size = 0.79 \begin {gather*} -\frac {\log \left (\frac {2 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right ) - \log \left (\frac {2 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-5*cos(d*x+c)),x, algorithm="maxima")

[Out]

-1/4*(log(2*sin(d*x + c)/(cos(d*x + c) + 1) + 1) - log(2*sin(d*x + c)/(cos(d*x + c) + 1) - 1))/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 46, normalized size = 0.73 \begin {gather*} -\frac {\log \left (-\frac {3}{2} \, \cos \left (d x + c\right ) + 2 \, \sin \left (d x + c\right ) + \frac {5}{2}\right ) - \log \left (-\frac {3}{2} \, \cos \left (d x + c\right ) - 2 \, \sin \left (d x + c\right ) + \frac {5}{2}\right )}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-5*cos(d*x+c)),x, algorithm="fricas")

[Out]

-1/8*(log(-3/2*cos(d*x + c) + 2*sin(d*x + c) + 5/2) - log(-3/2*cos(d*x + c) - 2*sin(d*x + c) + 5/2))/d

________________________________________________________________________________________

Sympy [A]
time = 0.36, size = 44, normalized size = 0.70 \begin {gather*} \begin {cases} \frac {\log {\left (2 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} - 1 \right )}}{4 d} - \frac {\log {\left (2 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + 1 \right )}}{4 d} & \text {for}\: d \neq 0 \\\frac {x}{3 - 5 \cos {\left (c \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-5*cos(d*x+c)),x)

[Out]

Piecewise((log(2*tan(c/2 + d*x/2) - 1)/(4*d) - log(2*tan(c/2 + d*x/2) + 1)/(4*d), Ne(d, 0)), (x/(3 - 5*cos(c))
, True))

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 38, normalized size = 0.60 \begin {gather*} -\frac {\log \left ({\left | 2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - \log \left ({\left | 2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(3-5*cos(d*x+c)),x, algorithm="giac")

[Out]

-1/4*(log(abs(2*tan(1/2*d*x + 1/2*c) + 1)) - log(abs(2*tan(1/2*d*x + 1/2*c) - 1)))/d

________________________________________________________________________________________

Mupad [B]
time = 0.33, size = 17, normalized size = 0.27 \begin {gather*} -\frac {\mathrm {atanh}\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(5*cos(c + d*x) - 3),x)

[Out]

-atanh(2*tan(c/2 + (d*x)/2))/(2*d)

________________________________________________________________________________________